<?php 
include  "../protected.php"; /*Valida el inico de sesion*/
?>
<!DOCTYPE html>
<head>
<link href="ceGrid.css" rel="stylesheet" type="text/css">
<link href="main.css" rel="stylesheet" type="text/css">
</head>

<button class ="btn" id= "atras" type="button" onclick="javascript: location.href='../../menu.php'">Regresar</button>

<body>
<div id="content">
<?php

$host = "localhost";
$usuario = "root";
$clave = "123A";

require '../tool/ceSQL.php';
require '../tool/ceGrid.php';

$dbase = new ceMySQLAdap($host,$usuario, $clave,"dbgenesys");

$dg = new ceDataGrid($dbase); 

$dg->setQuery("GS04COBO,GS04FEBO,GS01COAC,GS02COTP,GS03COPR,GS04CACP,GS04ESBO","gs04regbol");

$dg->allowFilters();

//$dg->showCreateButton("href='mt01.php'", ceDataGrid::TYPE_ONCLICK, 'Agregar');
$dg->setResultsPerPage(20);
$dg->showCreateButton("href='../regBolet/form.php'", ceDataGrid::TYPE_ONCLICK, 'Agregar');
$dg->setResultsPerPage(8);

$dg->setColumnHeader('GS04COBO', 'Codigo de boleta');
$dg->setColumnHeader('GS04FEBO', 'Fecha registro');
$dg->setColumnHeader('GS01COAC', 'Academico');
$dg->setColumnHeader('GS02COTP', 'Curso');
$dg->setColumnHeader('GS03COPR', 'Tipo curso');
$dg->setColumnHeader('GS04CACP', 'Copias');
$dg->setColumnHeader('GS04ESBO', 'Estado');

$dg->addStandardControl(ceDataGrid::STDCTRL_PRINT, "href='generador.php?id=%GS04COBO%'");
$dg->addStandardControl(ceDataGrid::STDCTRL_EDIT, "href='mt02.php?id=%GS04COBO%'");
$dg->addStandardControl(ceDataGrid::STDCTRL_DELETE, "href='delete.php?id=%GS04COBO%'");

$dg->showReset("Refrescar");
$dg->printTable();
?>
</div>
</body>
</html>